import VueRouter from 'vue-router'

// 导入对应的路由组件
import Home from "./components/tabber/home.vue"
import Member from "./components/tabber/member.vue"
import Shopcar from "./components/tabber/shopcar.vue"
import Search from "./components/tabber/search.vue"

// 3. 创建路由对象
var router = new VueRouter({
  routes: [//路由配置规则
    { path: "/", redirect: '/home'},
    { path: '/home', component: Home },
    { path: '/member', component: Member },
    { path: '/shopcar', component: Shopcar },
    { path: '/search', component: Search },
  ],
  linkActiveClass: "mui-active"//覆盖默认路由的高亮类，默认的类叫router-link-active
})

// 把路由对象暴露出去
export default router